Skip to main content

All Questions

1vote
2answers
81views

Extracting items from comma/semicolon-delimited strings, discarding parts after a hyphen

New Scala dev here. Is there a more idiomatic or efficient way to accomplish this in Scala? Given a list of the following strings, I need to obtain the unique 'main parts' once any parts including ...
Jonathan Spiller's user avatar
3votes
2answers
4kviews

Separate an email address into its username and domain name

This is my first ever Python program and I wanted to get everyone's opinions on it. The goal of the program is to separate an email address into its username and domain name. ...
Mohamed Tawous's user avatar
2votes
1answer
1kviews

(Codewars): Find the Unknown Digit

Kata: https://www.codewars.com/kata/find-the-unknown-digit/train/python To give credit where credit is due: This problem was taken from the ACMICPC-Northwest Regional Programming Contest. Thank ...
Tobi Alafin's user avatar
7votes
3answers
6kviews

Splitting std::string based on delimiter using only find and substr

I have been playing around with these two functions for a bit, dunno if this is practical though. I have only been learning C++ for a couple of days, coming from a Java background. There we had a ...
Noor's user avatar
4votes
2answers
2kviews

Compare two CSV files In Ruby

I wrote my first program in Ruby that compares two CSV files, but I'm sure there are more efficient ways to do it. I tried using the Ruby CSV library at first, but it was unproductive. Please let me ...
nybyjojo's user avatar
1vote
1answer
71views

Collating creature descriptors spread across multiple stanzas

I have been using Python for only a few days, so I am trying to learn about some best practices. An explanation of what this code is supposed to do is at the bottom of this post. It is an exercise to ...
bio_inf_dreamer's user avatar
2votes
4answers
41kviews

Parsing a string to get the values of certain attributes

I have written a small method that extracts certain information from a string. An example of such a string is ...
InvisiblePanda's user avatar

close